version 7.0
log using CPS.log, replace
#delimit ;

*     ***************************************************************** *;
*     ***************************************************************** *;
*   File-Name:  CPS.do                                                  *;
*   Date:       September 17, 2001                                      *;
*   Author:     MRG                                                     *;
*   Purpose:    Basic Model for CSP paper                               *;
*   Input File: masterdata.dta                                          *;
*   Output File:CPS.log                                                 *;
*   Data Output:CPS.dta                                                 *;
*   Previous file:                                                      *;
*   Machine:    system12                                                *;
*     ****************************************************************  *;
*     ****************************************************************  *;


use h:\CPS\Data\masterdata.dta;

generate logmagnitude=ln(magnitude);

*     ****************************************************************  *;
*                    Descriptive Statistics                             *;
*     ****************************************************************  *;

summarize;

drop logmagnitude;

correlate unemployment immigration;

*     ****************************************************************  *;
*                      Basic Model:Populist Parties                     *;
*     ****************************************************************  *;

tobit   populist unemployment immigration UnempImmig magnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
*     ****************************************************************  *;
*                      Basic Model:Neofascist Parties                   *;
*     ****************************************************************  *;

tobit   neofascist unemployment immigration UnempImmig magnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
*     ****************************************************************  *;
*                      Basic Model:Extreme Right Parties                *;
*     ****************************************************************  *;

tobit   extreme unemployment immigration UnempImmig magnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        

*     ****************************************************************  *;
*     ****************************************************************  *;
*        Now run the same models but dropping the interaction term      *;
*     ****************************************************************  *;
*     ****************************************************************  *;


*     ****************************************************************  *;
*               No Interaction Model:Populist Parties                   *;
*     ****************************************************************  *;

tobit   populist unemployment immigration magnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
*     ****************************************************************  *;
*               No Interaction Model:Neofascist Parties                 *;
*     ****************************************************************  *;

tobit   neofascist unemployment immigration magnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
*     ****************************************************************  *;
*               No Interaction Model:Extreme Right Parties              *;
*     ****************************************************************  *;

tobit   extreme unemployment immigration magnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
*     ****************************************************************  *;
*     ****************************************************************  *;
*       Now see if it makes a difference if I take the log of the       *;
*       district magnitude.  This is perhaps more theoretically         *;
*       reasonable.                                                     *;
*     ****************************************************************  *;
*     ****************************************************************  *;

generate logmagnitude=ln(magnitude);

*     ****************************************************************  *;
*                      Basic Model:Populist Parties                     *;
*     ****************************************************************  *;

tobit   populist unemployment immigration UnempImmig logmagnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
*     ****************************************************************  *;
*                      Basic Model:Neofascist Parties                   *;
*     ****************************************************************  *;

tobit   neofascist unemployment immigration UnempImmig logmagnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
*     ****************************************************************  *;
*                      Basic Model:Extreme Right Parties                *;
*     ****************************************************************  *;

tobit   extreme unemployment immigration UnempImmig logmagnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        

*     ****************************************************************  *;
*     ****************************************************************  *;
*        Now run the same models but dropping the interaction term      *;
*     ****************************************************************  *;
*     ****************************************************************  *;


*     ****************************************************************  *;
*               No Interaction Model:Populist Parties                   *;
*     ****************************************************************  *;

tobit   populist unemployment immigration logmagnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
*     ****************************************************************  *;
*               No Interaction Model:Neofascist Parties                 *;
*     ****************************************************************  *;

tobit   neofascist unemployment immigration logmagnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
*     ****************************************************************  *;
*               No Interaction Model:Extreme Right Parties              *;
*     ****************************************************************  *;

tobit   extreme unemployment immigration logmagnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);

*     ****************************************************************  *;
*       Check the significance of the country dummy variables           *;
*       Likelihood Test                                                 *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                      Populist Parties: No Log of Magnitude            *;
*     ****************************************************************  *;

tobit   populist unemployment immigration UnempImmig magnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
tobit   populist unemployment immigration UnempImmig magnitude uppertier, 
ll(0) ltolerance (1e-5);

*     ****************************************************************  *;
*                      Populist Parties:Log of Magnitude                *;
*     ****************************************************************  *;

tobit   populist unemployment immigration UnempImmig logmagnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
tobit   populist unemployment immigration UnempImmig logmagnitude uppertier, 
ll(0) ltolerance (1e-5);

*     ****************************************************************  *;
*                           Check for Robustness                        *;
*     ****************************************************************  *;

*     ****************************************************************  *;

drop if country=="Greece";

tobit   populist unemployment immigration UnempImmig logmagnitude uppertier
        austria belgium denmark finland france germany iceland 
        ireland italy luxembourg malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);

clear;

use h:\CPS\Data\masterdata.dta;

generate logmagnitude=ln(magnitude);

drop if country=="Luxembourg";

tobit   populist unemployment immigration UnempImmig logmagnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy  malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        
clear;

use h:\CPS\Data\masterdata.dta;

generate logmagnitude=ln(magnitude);

*     ****************************************************************  *;
*       Now what happens if I interact logmagnitude with immigration.   *;
*     ****************************************************************  *;

generate logmagimmig=logmagnitude*immigration;

tobit   populist unemployment immigration logmagimmig logmagnitude uppertier
        austria belgium denmark finland france germany greece iceland 
        ireland italy  malta norway portugal spain 
        sweden switzerland unitedkingdom, ll(0) ltolerance (1e-5);
        

save    CPS, replace; exit;
